RTMEUSDIR=`pwd | sed 's/\/tools//'`

#add something in .bashrc.rtm
if [ -z"${ARCHDIR+xxx}" ];
then
    OS=`/bin/uname | sed s/-.*//`
    if test ${OS} = "CYGWIN_NT"; 
    then
	ARCHDIR=Cygwin
    elif test ${OS} = "Linux";
    then
	ARCHDIR=Linux
    else
	echo "unsupported OS"
    fi
    echo "export ARCHDIR="$ARCHDIR >> $HOME/.bashrc.rtm
fi
echo " " >> $HOME/.bashrc.rtm
echo "#for rtmeus " >> $HOME/.bashrc.rtm
echo "export RTMEUSDIR="$RTMEUSDIR >> $HOME/.bashrc.rtm
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RTMEUSDIR/RTMEus/Linux/lib' >> $HOME/.bashrc.rtm
echo " " >> $HOME/.bashrc.rtm
echo "#for rtcshell" >> $HOME/.bashrc.rtm
echo "export RTCTREE_NAMESERVERS=localhost" >> $HOME/.bashrc.rtm
echo "source /usr/local/share/rtshell/shell_support" >> $HOME/.bashrc.rtm
echo " " >> $HOME/.bashrc.rtm
echo "#for rtmext" >> $HOME/.bashrc.rtm
echo "export PATH=\${PATH}:/usr/local/src/rtctools/rtmext" >> $HOME/.bashrc.rtm
echo "export RTM_PACKAGE_PATH=/usr/local/src/OpenRTM/OpenRTM-aist-1.0.0/examples" >> $HOME/.bashrc.rtm
echo "function rtmcd () {" >> $HOME/.bashrc.rtm
echo "    cd \`rtmpack find \$1\`" >> $HOME/.bashrc.rtm
echo "}" >> $HOME/.bashrc.rtm
